<template>
	<div>
		<a-modal v-model:open="this.openGet" title="会员信息" @ok="onCloseGet" style="width: 50rem">
			<hr />
			<template #footer>
				<a-button key="submit" type="primary" :loading="loading" @click="onCloseGet">确认</a-button>
			</template>
			<a-row style="margin-top: 1rem;" :gutter="16">
				<!--头像-->
				<a-col :span="24" style="margin-left: 43.5%">
					<a-avatar :size="76" :src=this.mbMemberInfoVo.uuidAvatar :value="this.mbMemberInfoVo.id">
						<template #icon>
							<UserOutlined />
						</template>
					</a-avatar>
				</a-col>
			</a-row>
			<!--签名-->
			<a-row :gutter="16">
				<a-col style="margin: auto;">
					<a-form-item
						label="签名"
						name=""
					>
						<span>{{ this.mbMemberInfoVo.signature }}</span>
					</a-form-item>
				</a-col>
			</a-row>
			<!--链上标识-->
			<a-row :gutter="16">
				<a-col style="margin: auto;">
					<a-form-item
						label="链上标识"
						name=""
					>
						<span>{{ this.mbMemberInfoVo.chainAddr }}</span>
					</a-form-item>
				</a-col>
			</a-row>
			<!--基本信息-->
			<a-card title="基本信息" style="width: 90%;margin: auto;">
				<a-row :gutter="16" style="margin-top: 0.5rem;">
					<!--昵称-->
					<a-col :span="12">
						<a-form-item
							label="昵称"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.nickname }}</span>
						</a-form-item>
					</a-col>
					<!--账号-->
					<a-col :span="12">
						<a-form-item
							label="账号"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.account }}</span>
						</a-form-item>
					</a-col>
					<!--姓名-->
					<a-col :span="12">
						<a-form-item
							label="姓名"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.name }}</span>
						</a-form-item>
					</a-col>
					<!--性别-->
					<a-col :span="12">
						<a-form-item
							label="性别"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.gender }}</span>
						</a-form-item>
					</a-col>
					<!--年龄-->
					<a-col :span="12">
						<a-form-item
							label="年龄"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.age }}</span>
						</a-form-item>
					</a-col>
					<!--出生日期-->
					<a-col :span="12">
						<a-form-item
							label="出生日期"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.birthday }}</span>
						</a-form-item>
					</a-col>
					<!--民族-->
					<a-col :span="12">
						<a-form-item
							label="民族"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.nation }}</span>
						</a-form-item>
					</a-col>
					<!--籍贯-->
					<a-col :span="12">
						<a-form-item
							label="籍贯"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.nativePlace }}</span>
						</a-form-item>
					</a-col>
					<!--家庭住址-->
					<a-col :span="12">
						<a-form-item
							label="家庭住址"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.homeAddress }}</span>
						</a-form-item>
					</a-col>
					<!--通信地址-->
					<a-col :span="12">
						<a-form-item
							label="通信地址"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.mailingAddress }}</span>
						</a-form-item>
					</a-col>
					<!--是否实名-->
					<a-col :span="12">
						<a-form-item
							label="是否实名"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.isKyc }}</span>
						</a-form-item>
					</a-col>
				</a-row>
			</a-card>
			<!--教育经历-->
			<a-card title="教育经历" style="width: 90%;margin: auto;margin-top: 1rem">
				<a-row :gutter="16" style="margin-top: 0.5rem;">
					<!--文化程度-->
					<a-col :span="12">
						<a-form-item
							label="文化程度"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.cultureLevel }}</span>
						</a-form-item>
					</a-col>
					<!--政治面貌-->
					<a-col :span="12">
						<a-form-item
							label="政治面貌"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.politicalOutlook }}</span>
						</a-form-item>
					</a-col>
					<!--毕业院校-->
					<a-col :span="12">
						<a-form-item
							label="毕业院校"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.college }}</span>
						</a-form-item>
					</a-col>
					<!--学历-->
					<a-col :span="12">
						<a-form-item
							label="学历"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.education }}</span>
						</a-form-item>
					</a-col>
					<!--学制-->
					<a-col :span="12">
						<a-form-item
							label="学制"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.eduLength }}</span>
						</a-form-item>
					</a-col>
					<!--学位-->
					<a-col :span="12">
						<a-form-item
							label="学位"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.degree }}</span>
						</a-form-item>
					</a-col>
				</a-row>
			</a-card>
			<!--联系方式-->
			<a-card title="联系方式" style="width: 90%;margin: auto;margin-top: 1rem">
				<a-row :gutter="16" style="margin-top: 0.5rem;">
					<!--手机-->
					<a-col :span="12">
						<a-form-item
							label="手机"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.phone }}</span>
						</a-form-item>
					</a-col>
					<!--邮箱-->
					<a-col :span="12">
						<a-form-item
							label="邮箱"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.email }}</span>
						</a-form-item>
					</a-col>
					<!--家庭电话-->
					<a-col :span="12">
						<a-form-item
							label="家庭电话"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.homeTel }}</span>
						</a-form-item>
					</a-col>
					<!--办公电话-->
					<a-col :span="12">
						<a-form-item
							label="办公电话"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.officeTel }}</span>
						</a-form-item>
					</a-col>
					<!--紧急联系人-->
					<a-col :span="12">
						<a-form-item
							label="紧急联系人"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.emergencyContact }}</span>
						</a-form-item>
					</a-col>
					<!--紧急联系人电话-->
					<a-col :span="12">
						<a-form-item
							label="紧急联系人电话"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.emergencyPhone }}</span>
						</a-form-item>
					</a-col>
					<!--紧急联系人地址-->
					<a-col :span="12">
						<a-form-item
							label="紧急联系人地址"
							name=""
						>
							<span>{{ this.mbMemberInfoVo.emergencyAddress }}</span>
						</a-form-item>
					</a-col>
				</a-row>
			</a-card>
		</a-modal>
	</div>
</template>

<script>
import {
	UserOutlined
} from "@ant-design/icons-vue";
import member from "@/api/nft/member/member";

export default {
	name: "GetMb",
	components: {
		UserOutlined
	},
	data() {
		return {
			openGet: false,
			mbMemberInfoVo: {
				id: null,
				avatar: null,
				uuidAvatar: null,
				signature: null,
				account: null,
				name: null,
				nickname: null,
				gender: null,
				age: null,
				birthday: null,
				nation: null,
				nativePlace: null,
				homeAddress: null,
				mailingAddress: null,
				isKyc: null,
				idCardType: null,
				idCardNumber: null,
				cultureLevel: null,
				politicalOutlook: null,
				college: null,
				education: null,
				eduLength: null,
				degree: null,
				phone: null,
				email: null,
				homeTel: null,
				officeTel: null,
				emergencyContact: null,
				emergencyPhone: null,
				emergencyAddress: null,
				userStatus: null,
				chainAddr: null
			}
		};
	},
	methods: {
		showGetMb(id) {
			this.id = id;
			debugger;
			member.getMember(id).then((resp) => {
				this.mbMemberInfoVo = resp;
				if (this.mbMemberInfoVo.gender == "0") {
					this.mbMemberInfoVo.gender = "男";
				} else {
					this.mbMemberInfoVo.gender = "女";
				}
				debugger;
				console.log(resp);
			}).catch((error) => {
				error.data.data;
				console.log(error);
			});
			this.openGet = true;
		},
		onCloseGet() {
			this.openGet = false;
		}
	}
};
</script>

<style scoped>

</style>
